﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ExamClient;

namespace ExamClient
{
    /// <summary>
    /// Übersichtsseite für die verschiedenen Gruppen. Dies ist gleichzeitig die Startseite
    /// und bietet die gleichen Navigationsmöglichkeiten wie die MenuBarPAge
    /// </summary>
    public partial class SummaryPage : Page
    {
        /// <summary>
        /// Der Standardkonstruktor ändert die vier Grids je nach Gruppenzugehörigkeit
        /// </summary>
        public SummaryPage()
        {
            InitializeComponent();
            switch (App.UserAddress.UserGroup.GroupId)
            {
                case 1:
                    third.Children.Clear();
                    fourth.Children.Clear();
                    break;
                case 2:
                    first.Children.Clear();
                    third.Children.Clear();
                    fourth.Children.Clear();
                    first.Children.Add(dozentDockPanel);
                    break;
                case 4:
                    first.Children.Clear();
                    third.Children.Clear();
                    fourth.Children.Clear();
                    first.Children.Add(adminDockPanel);
                    break;
                default:
                    break;
            }
            App.SummaryPage = this;
        }

        private void summaryExams_Click(object sender, RoutedEventArgs e)
        {
            App.MainWindow.center.Content = new MainPage(true);
        }
    }
}
